﻿// MIT License
// 开源地址：https://gitee.com/co1024/AbcMvc
// Copyright (c) 2021-2023 1024
// Abc.Mvc=Furion+EF+SqlSugar+Pear layui admin.

using Furion;
using Microsoft.Extensions.DependencyInjection;

namespace Test_Abc.Base;
public class Startup : AppStartup
{
    public void ConfigureService(IServiceCollection services)
    {
        services.AddFileLogging(options =>
        {
            //启用备用日志文件功能，也就是如果文件被占用了，可以创建新的备用日志继续写入，推荐！！！
            options.HandleWriteError = (writeError) =>
            {
                writeError.UseRollbackFileName(Path.GetFileNameWithoutExtension(writeError.CurrentFileName) + "-oops" + Path.GetExtension(writeError.CurrentFileName));
            };
        });
    }
}
